#ifndef TOMATOCLOCKBUTTON_H
#define TOMATOCLOCKBUTTON_H
#include <QPushButton>
#include <QLabel>
#include <QPixmap>
#include <QHBoxLayout>
#include "widgets/tomatowidget.h"

class TomatoClockButton : public QPushButton {
    Q_OBJECT

signals:
    void buttonClicked();

private slots:
    void onButtonClicked();

public:
    explicit TomatoClockButton(QWidget *parent = nullptr);
    void setLogo(const QPixmap &logo);
    void setText(QString time);
    

private:
    QLabel *logoLabel;
    QLabel *textLabel;
    QHBoxLayout *layout;
    int duration; // 用于存储倒计时时间
    void initUI();
    void adjustSize();
};

#endif // TOMATOCLOCKBUTTON_H